/**
 * Created by steward on 16/2/25.
 */
(function(lf, r){
    var getSignOther = lf.bridgeJs.getSignOther;
    var sign = lf.bridgeJs.sign;
    var doAction = lf.bridgeJs.doAction;
    var selectMutiPhoto = lf.bridgeJs.selectMutiPhoto;
    var Title = r.createClass({
        render: function() {
            return(
                    <div className="register-title">
                        <a className="title">{this.props.title}</a>
                    </div>
            )
        }
    })
    var Content = r.createClass({
        clickContent: function(e) {
            this.props.clickHandler(e);
        },
        render: function() {
            return (
                <div className="lf-list">
                    <ul className="mui-table-view" onClick={this.clickContent}>
                        <li className="mui-table-view-cell">
                            <a className="mui-navigate-right">{this.props.content}</a>
                        </li>
                    </ul>
                </div>
            )
        }
    })
    var Layout = r.createClass({
        handleClickOther: function(e){
            getSignOther();
        },
        handleClickSign: function(e){
            sign();
        },
        handleClickSetting: function(e) {
            doAction('sign_in_setting_list.html', '设置');
            //selectMutiPhoto('8')
        },
        render: function() {
            return(
                <div className='register-more'>
                    <Title title="查看部门今日最新签到" />
                    <Content content="今日最新签到" clickHandler={this.handleClickSign}/>
                    <Title title="查看个人签到历史" />
                    <Content content="查看他人" clickHandler={this.handleClickOther}/>
                    <Content content="设置" clickHandler={this.handleClickSetting}/>
                </div>
            );
        }
    });

    r.render(
      <Layout/>,
        document.getElementById('root')
    );
})(liefeng, React);